<template>
	<view>
		<view class="resultIcon">
			<u-icon v-if="isPay == 'true'" name="checkmark-circle-fill" color="#5da82b" size="80"></u-icon>
			<u-icon v-else name="close-circle-fill" color="#ff0b0f" size="80"></u-icon>
			
		</view>
		<p style="text-align: center;margin-top: 50rpx;font-size: 32rpx;">{{ isPay == 'true' ? '支付成功' : '支付失败'}}</p>
		<view class="resultIcon">
			<view class="resultButton resultButton_look" @click="order">
				查看订单
			</view>
			<view class="resultButton resultButton_back" @click="tohome">
				回到首页
			</view>
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isPay:false,
			}
		},
		onLoad(options) {
			this.isPay = options.isPay
		},
		methods: {
			order(){
				uni.navigateTo({
					url:`/orderPage/index/index?status=`
				})
			},
			tohome(){
				uni.navigateTo({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.resultIcon{
		margin-top: 80rpx;
		display: flex;
		justify-content: space-evenly
	}
	.resultButton{
		width: 280rpx;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		font-size: 26rpx;
		border-radius: 50rpx;
	}
	.resultButton_look{
		background: none;
		border: 1px solid #c2c2c2;
		color: #000;
	}
	.resultButton_back{
		background: #1786f8;
		border: 1px solid #c2c2c2;
		color: #fff;
	}
</style>
